//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#if !defined(_SCREENCONF_H_)
#define _SCREENCONF_H_

#ifdef _arm
#define SCREEN_WIDTH    240
#define SCREEN_HEIGHT   320
#else
#define SCREEN_WIDTH    800
#define SCREEN_HEIGHT   600
#endif

#define SCREEN_COLOR 16


#if (SCREEN_COLOR == 16)
#define MAP_COLOR(color)     ((color) >> 8) & 0xF800 \
                                | ((color) >> 5) & 0x7E0 \
                                | ((color) >> 3) & 0x1F

#define RESTORE_COLOR(color) ((color) & 0xF800) << 8 \
                                | ((color) & 0x7E0) << 5 \
                                | ((color) & 0x1F) << 3

#elif (SCREEN_COLOR == 8)
#error not support
#else
#define MAP_COLOR(color)     color
#define RESTORE_COLOR(color) color
#endif


#endif //#if !defined(_SCREENCONF_H_)
